package com.wxl.asmgradleplugin.myplugin

import com.android.build.api.transform.QualifiedContent.ContentType
import com.android.build.api.transform.QualifiedContent.DefaultContentType
import com.android.build.api.transform.QualifiedContent.Scope
import com.android.build.api.transform.QualifiedContent.ScopeType


object TransformManager {
    val EMPTY_SCOPES: MutableSet<ScopeType> = mutableSetOf<ScopeType>()

    // 代表 javac 编译成的 class 文件，常用
    val CONTENT_CLASS: MutableSet<ContentType> =
        mutableSetOf<ContentType>(DefaultContentType.CLASSES)
    val CONTENT_JARS: MutableSet<ContentType> =
        mutableSetOf<ContentType>(DefaultContentType.CLASSES, DefaultContentType.RESOURCES)

    // 这里的 resources 单指 java 的资源
    val CONTENT_RESOURCES: MutableSet<ContentType> =
        mutableSetOf<ContentType>(DefaultContentType.RESOURCES)

//    val CONTENT_NATIVE_LIBS: MutableSet<ContentType> =
//        mutableSetOf<ContentType>(ExtendedContentType.NATIVE_LIBS)
//    val CONTENT_DEX: MutableSet<ContentType> = mutableSetOf<ContentType>(ExtendedContentType.DEX)
//    val CONTENT_DEX_WITH_RESOURCES: MutableSet<ContentType?> =
//        mutableSetOf<ContentType>(ExtendedContentType.DEX, RESOURCES)

    val PROJECT_ONLY: MutableSet<ScopeType> = mutableSetOf(Scope.PROJECT)
    val SCOPE_FULL_PROJECT: MutableSet<Scope> = mutableSetOf(
        Scope.PROJECT,
        Scope.PROJECT_LOCAL_DEPS,
        Scope.SUB_PROJECTS,
        Scope.SUB_PROJECTS_LOCAL_DEPS,
        Scope.EXTERNAL_LIBRARIES
    )
    val SCOPE_FULL_LIBRARY: MutableSet<Scope> = mutableSetOf(
        Scope.PROJECT,
        Scope.PROJECT_LOCAL_DEPS
    )
}